home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_00 / powdemo3.bas < prev    next >
BASIC Source File  |  1995-01-01  |  855b  |  30 lines

  1. $string 32
  2. $link "pow.pbl"
  3. $include "pow.inc"
  4.  
  5.  
  6. 'POW! Demo of SBPLAYFILE and SBPLAYSTRING direct mode
  7. 'playback of digitized sample data - requires WELCOME.RAW,
  8. 'a raw sample file included with POW!
  9.  
  10. wr$="welcome.raw"
  11. if dir$(wr$)="" then
  12.     line input "Path to WELCOME.RAW: ";pth$
  13.      if right$(pth$,1)<>"\" then pth$=pth$+"\"
  14.      wr$=pth$+wr$
  15. end if
  16.  
  17. sbreset
  18. for t%=50 to 30 step -5
  19. sbplayfile wr$,t%         'Play the entire file at varying speeds
  20. next t%
  21. if dir$(wr$)="" then end  'Quit if file not found
  22. open "b",#1,wr$           'Open file for binary access
  23. get$ 1,400,a$             'Throw away first 400 bytes
  24. get$ 1,2300,a$            'Get 2300 byte portion
  25. close 1
  26. for t%=1 to 4
  27. sbplaystring a$,20       'Play part of the file contained in string
  28. next t%
  29. sbplayfile wr$,20        'Play the entire file one last time
  30.